<!DOCTYPE html>
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <link rel="StyleSheet" type="text/css" href="/tpa/admin.css" />
      <link rel="StyleSheet" type="text/css" href="/tpa/jsTree.css" />
      <script type="text/javascript" src="/lib/js/jquery.js"></script>
      <script type="text/javascript" src="/lib/js/jquery.ui.js"></script>
      <script type="text/javascript" src="/lib/js/jquery.jstree.js"></script>
      <script type="text/javascript">
         $(document).ready(function(){
            jQuery("#tree").jstree({
               plugins: ["themes", "html_data", "types"],
               themes: {"theme": "classic"},
               types: {
                  types: {
                     root: {
                       icon: {image: "/tpa/img/tree/d.png", position: "-37px -90px"},
                     },
                     tool: {
                        valid_children: "none",
                        icon: {image: "/tpa/img/tree/d.png", position: "-3px -73px"}
                     }
                  }
               }
            });
         });
      </script>
      <style type="text/css">
         * html body { /*IE6 hack*/ padding: 0 0 0 235px; /*Set value to (0 0 0 WidthOfFrameDiv)*/ }
         * html #maincontent { /*IE6 hack*/ height: 100%; width: 100%; }
         * html .innertube { /*IE6 hack*/ height: 97%; width: 100%; }
      </style>
   </head>
   <body>

      <div id="treecontent">
         <div class="innertube" id="tree">
            <ul>
               <li rel="root" class="jstree-open"><a href="#">{%$tree->title%}</a>
                  <ul>
                     {%foreach from=$tree->childs item='n'%}
                     {%if $node->id neq 2 || $authorizedUser->id eq 1%}
                     {%if $n->childs|@count > 0 && ($n->id neq 2 || $authorizedUser->id eq 1)%}
                     <li class="jstree-open"><a href="#">{%$n->title%}</a>
                        <ul>
                           {%foreach from=$n->childs item='ni'%}
                           <li rel="tool"><a href="/admin/{%$ni->alias%}.html" target="inject">{%$ni->title%}</a></li>
                           {%/foreach%}
                        </ul>
                     </li>
                     {%else%}
                     <li rel="tool"><a href="/admin/{%$n->alias%}.html" target="inject">{%$n->title%}</a></li>
                     {%/if%}
                     {%/if%}
                     {%/foreach%}
                  </ul>
               </li>
            </ul>
         </div>
      </div>

      <div id="maincontent">
         <div class="innertube" style="overflow:hidden;">
            <iframe name="inject" id="inject" width="100%" height="100%" frameborder="no" scrolling="auto" src="/admin/welcome.php"></iframe>
         </div>
      </div>

   </body>
</html>